package com.yh.rbac.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.yh.rbac.dao.PermissionMapper;
import com.yh.rbac.entity.Permission;
import com.yh.rbac.service.PermissionService;

@Service
public class PermissionServiceImpl implements PermissionService {

	@Resource
	private PermissionMapper permissionMapper ;
	@Transactional(propagation = Propagation.REQUIRED)
	@Override
	public int deleteByPrimaryKey(Long id) {
		return permissionMapper.deleteByPrimaryKey(id) ;
	}

	@Transactional(propagation = Propagation.REQUIRED)
	@Override
	public int insert(Permission record) {
		return permissionMapper.insert(record) ;
	}

	@Override
	public Permission selectByPrimaryKey(Long id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Permission> selectAll() {
		return permissionMapper.selectAll() ;
	}

	@Override
	public int updateByPrimaryKey(Permission record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<Permission> selectByCondition(String condition) {
		return permissionMapper.selectByCondition(condition) ;
	}

}
